/**
 * Created by Administrator on 2017/6/30.
 */

import React from 'react'
import {View,StyleSheet,Text,Image,TouchableOpacity} from 'react-native'

export default class Profit extends React.Component{


    static navigationOptions = ({navigation}) =>{
        const {goBack,navigate} = navigation;
        return{
            headerStyle: {
                height: 70,
                backgroundColor: '#F1982F',
            },
            title: '收益',
            headerTitleStyle: {
                color: '#FFFFFF',
                alignSelf: 'center',
                marginTop: 25,
                marginLeft: -10,
            },
            headerLeft: <TouchableOpacity style={{marginLeft: 10, marginTop: 25}} onPress={() => goBack()}>
                <Image source={require('../.././Img/btn_fanhui@2x.png')}/>
            </TouchableOpacity>
        }
    }

    render(){
        return(
            <View style={styles.container}>
                <View style={styles.headContent}>
                    <Text style={styles.textSty_1}>
                        当前可用余额（元）
                    </Text>
                    <Text style={styles.textSty_2}>
                        4560.00
                    </Text>
                </View>

                <View style={{height:12,backgroundColor:'#e3e3e3'}}></View>

                <View style={styles.itemContent}>
                    <View style={styles.itemLeftContent}>
                        <Image  style={{width:16,height:16}} source={require('../.././Img/icon_profit_ti_xian.png')}/>
                        <Text style={{fontSize:14,marginLeft:8}}>提现</Text>
                    </View>
                    <Image style={{marginRight:8}} source={require('../.././Img/btn_xiala_hui@2x.png')}/>
                </View>

                <View style={{height:1,backgroundColor:'#e3e3e3'}}></View>

                <View style={styles.itemContent}>
                    <View style={styles.itemLeftContent}>
                        <Image  style={{width:16,height:16}} source={require('../.././Img/icon_profit_ti_xian.png')}/>
                        <Text style={{fontSize:14,marginLeft:8}}>绑定支付宝</Text>
                    </View>
                    <Image style={{marginRight:8}} source={require('../.././Img/btn_xiala_hui@2x.png')}/>
                </View>

                <View style={{height:1,backgroundColor:'#e3e3e3'}}></View>

                <TouchableOpacity onPress={()=>this.props.navigation.navigate('profitDetails')}>
                    <View style={styles.itemContent}>
                        <View style={styles.itemLeftContent}>
                            <Image  style={{width:16,height:16}} source={require('../.././Img/icon_profit_ti_xian.png')}/>
                            <Text style={{fontSize:14,marginLeft:8}}>收益详情</Text>
                        </View>
                        <Image style={{marginRight:8}} source={require('../.././Img/btn_xiala_hui@2x.png')}/>
                    </View>
                </TouchableOpacity>



                <View style={{height:1,backgroundColor:'#e3e3e3'}}></View>


            </View>
        )
    }
}


const styles = StyleSheet.create({
    itemContent:{
        flexDirection:'row',
        justifyContent:'space-between',
        alignItems:'center',
        height:50
    },
    itemLeftContent:{
        flexDirection:'row',
        marginLeft:8,
        alignItems:'center'
    },
    container:{
        flex:1,
        backgroundColor:'#fff'
    },
    headContent:{
        height:150,
        backgroundColor:'#F1982F'
    },
    textSty_1:{
        fontSize:12,
        color:'#fff',
        marginLeft:16,
        marginTop:45
    },
    textSty_2:{
        fontSize:22,
        color:'#fff',
        marginLeft:16,
        marginTop:30
    }
})
